<!--顶部开始-->
<div id="top">
  <div class="header_top">
    <ul>
        
     <li class="F" id="li_tip">您好，欢迎光临雷鸣团！
      	<strong><a href="/shop_signin.html">[登录]</a></strong>
      	<strong><a href="/shop_register.html">[免费注册]</a></strong>
      </li>
    </ul>
  </div>
</div>
<!--顶部结束-->
<script type='text/javascript' src='/dwr/engine.js'></script>
<script type='text/javascript' src='/dwr/util.js'></script>
<script type='text/javascript' src='/dwr/interface/Ti_subscribeInfo.js'></script> 
<script type='text/javascript' src='/templets/html/shop/js/_shop.js'></script>
<!--头部开始-->
<div id="head">
  <div class="header">
    <h1><a href="/">雷鸣商城</a></h1>
    <span class="search" style="display:none">
    <p><img src="/templets/html/shop/images/phone.gif" align="absmiddle" />7X24小时服务热线 4000-365-010</p>
    <form action="/doTradeReg.do" method="post" name="addForm" target="_self">
    <p>
	  <input name="keyword" id="keyword" type="text" value="==请输入您的邮箱==" class="text_area" onfocus="deltext()" onblur="addtext()" >
	  <script type="text/javascript" >
	  	function deltext(){
	  		var vtext = document.getElementById("keyword").value;
	  		var v = document.getElementById("keyword");
	  		if(vtext == "==请输入您的邮箱=="){
	  			document.getElementById("keyword").value="";
	  			v.setAttribute("style='color:#000000'");
	  		}
	  	}
	  	function addtext(){
	  		var vtext = document.getElementById("keyword").value;
	  		var v = document.getElementById("keyword");
	  		if(vtext == ""){
	  			document.getElementById("keyword").value = "==请输入您的邮箱==";
	  			v.setAttribute("style='color:#999999'");
	  		}
	  	}
	  	 function leaveSub(){
	  	 	var user_id='<%=user_id%>';
	  	 	if(user_id==''){
	  	 		window.location.href="/8diantuan_signin.html";
	  	 	}
	  		var vtext = document.getElementById("keyword").value;
			var myreg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
			if(vtext==''){
				alert('请输入您的邮件');
				document.getElementById('keyword').focus();
				return false;
			}else if(!myreg.test(vtext)){
				alert("请输入正确的邮箱信息");
				document.getElementById('keyword').focus();
				return false;
			}
			Ti_subscribeInfo.getIntByKeywrod(vtext,function(ret){
			var v = ret;
			if(v >= 1){
				alert("该邮箱已存在！");
				return false;
			}else{
				document.addForm.submit();
			}
		});
	}
	  </script> 
 	<input type="button" name="button2" value="订阅" class="text_btn" onclick="return leaveSub();"/>
    </p>
    <input name="info_type" id="info_type" type="hidden" value="1">
	<input name="cat_id_group" id="cat_id_group" type="hidden" value="">
	<input name="ch_id_group" id="ch_id_group" type="hidden" value="">
	<input name="info_num" id="info_num" type="hidden" value="">
	<input name="send_type" id="send_type" type="hidden" value="1">
	<input name="enabled" id="enabled" type="hidden" value="0">
	<input name="in_date" id="in_date" type="hidden" value="now()">

	 <input type="hidden" name="jumpurl" value="/8diantuan_tg.html" />
	 <input type="hidden" name="bpm_id" value="7188" />

      </form>
    </span>
    <div class="menu">
      <ul>
 
		{zlcms:sysnavlist row="9" cust_id="100000000000000" subsys="2"  }
			<li>
				<A  href="[field:link_url/]" >[field:title/]</A>
			</li>
		{/zlcms:sysnavlist}
      </ul>
      <p></p>
    </div>
  </div>
</div>
<!--顶部结束-->
<!--导航开始-->
<div class="bar">
  <div class="bar_main">
    <div class="input">
    <form name="keywordForm" action="/shop_goodslist.html" >
    	<input type="text"  name="keyword" id="keyword" class="input_area"/>
        <input type="button" value="搜索" name="btn" class="input_btn" onclick="checkKeyword()"/>
    </form>
      
      <ul>
   
        <strong>热门搜索:</strong>
         {zlcms:_shop_keywordlist row="10"  }
       	<li><a href="/shop_goodslist.html?cat_attr=[field:cat_attr/]">[field:keywords/]</a></li>
      	{/zlcms:_shop_keywordlist}
      </ul>
    </div>
    <div class="bar_main_right">
      <p><a href="/templets/html/shop/jsp/confirm_buycart.jsp"><em>0</em>件商品</a></p>
      <span><a href="/templets/html/shop/jsp/confirm_buycart.jsp">结账</a></span></div>
  </div>
</div>
<!--顶部结束-->
<script type="text/javascript">
	function loadSession(){
		jQuery.ajax( {
            type : "POST",
            url : "/templets/html/shop/jsp/getSessionName.jsp",
            data : "",
            success : function(msg) {
				if(msg!="0"&&msg!=0){
					document.getElementById("li_tip").innerHTML=msg+",欢迎光临雷鸣商城！<strong><a href='/shop_member.html'>[会员中心]</a></strong><strong><a href='/program/logout' >退出</a></strong>";
					document.getElementById("logout_a").style.display="";
				}
            }
        });
        jQuery.ajax( {
            type : "POST",
            url : "/templets/html/shop/jsp/getSessionCount.jsp",
            data : "",
            success : function(msg) {
					document.getElementById("count_em").innerHTML=msg;
            }
        });
	}
	loadSession();
			
</script>
